package Interview;

import java.util.HashSet;
import java.util.List;
import java.util.Scanner;
import java.util.Set;

/**
 * Created by loso on 2017/3/18.
 */
public class Memorymanagement3602017 {

    static memcontroler mem;

    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);

        while (input.hasNext()){
            int count = input.nextInt();
            int maxMem = input.nextInt();
            int value;
            mem = new memcontroler(maxMem);
            for (int i = 0; i < count; i++) {
                String commod = input.next();
                switch(commod){
                    case "new":
                        value = input.nextInt();
                        Newsize(value);
                        break;
                    case "del":
                        value = input.nextInt();
                        del(value);
                        break;
                    case "def":
                        def();
                        break;
                }
            }

        }
    }


    public static void Newsize(int size){

    }

    public static void del(int handle){

    }

    public static void def(){

    }
}

class memcontroler{
private int mem;
private int used;
public Set<Integer> set;

    public memcontroler(int mem) {
        this.mem = mem;
        used = 0;
        set = new HashSet<>();
    }


    public int getMem() {
        return mem;
    }

    public void setMem(int mem) {
        this.mem = mem;
    }

    public int getUsed() {
        return used;
    }

    public void setUsed(int used) {
        this.used = used;
    }
}
